package com.tianji.medical.service.Impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tianji.medical.mapper.PatientMedicationMapper;
import com.tianji.medical.pojo.PatientMedication;
import com.tianji.medical.service.PatientMedicationService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.Collections;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 陈佳
 * @since 2024-10-15
 */
@Service
@RequiredArgsConstructor
public class PatientMedicationServiceImpl extends ServiceImpl<PatientMedicationMapper, PatientMedication> implements PatientMedicationService {

    private final PatientMedicationMapper patientMedicationMapper;
    @Override
    public List<PatientMedication> findByShard(int shardIndex, int shardTotal, LocalDateTime now) {
        List<PatientMedication> patientMedications = patientMedicationMapper
                .findByShard(shardIndex,shardTotal,now);
        return patientMedications;
    }
}
